package com.sebiotec.driver.ui.view;

import android.content.Context;

import com.allen.library.interfaces.ILoadingView;

import com.sebiotec.driver.R;
import com.xuexiang.xui.utils.WidgetUtils;
import com.xuexiang.xui.widget.dialog.MiniLoadingDialog;


/***
 * 自定义loadingView 任何实现ILoadingView的View都可以(突破以前只能使用dialog的限制)
 */
public class LoadingDialog implements ILoadingView {

    private MiniLoadingDialog miniLoadingDialog;
    public Context context;
    public LoadingDialog(Context context) {
        this.context=context;
         miniLoadingDialog = WidgetUtils.getMiniLoadingDialog(context, context.getString(R.string.tip_loading_message));


    }


    @Override
    public void showLoadingView() {
        miniLoadingDialog.show();
    }

    @Override
    public void hideLoadingView() {
        miniLoadingDialog.dismiss();
    }
}